package com.vlong.town.controller.server.townInfo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.vlong.town.controller.base.BaseController;
import com.vlong.town.entity.townInfo.TownInfo;
import com.vlong.town.service.townInfo.TownInfoService;
/**
 * 村镇信息Rest接口Controller
 * @author Assassin
 */
@RequestMapping("/rest/townInfo")
@RestController
public class TownInfoRestController extends BaseController {

	@Autowired
	private  TownInfoService  townInfoService;
	
	/**
     * 查询村镇信息详情
     * @param id 村镇信息id
     * @return TownInfo
     */
    @GetMapping("/detail/{id}")
    public TownInfo gotoTownInfoPage(@PathVariable(required=true, value="id") Long id) {
        return this.townInfoService.query(id);
    }
}
